from handle import ProjectConfig, Log
from distributed import MyZK

projectIdList = [i for i, j in ProjectConfig.items()]

clientZK = MyZK()
# 每次服务重启后,释放所有锁
for i in projectIdList:
    try:
        clientZK.release_key(i)
    except Exception as e:
        Log.error(f"Lock release Error \n{e}")
Log.info("Release Locks is over!\n")